package com.sky.mapper;

import com.sky.dto.PasswordEditDTO;
import com.sky.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    /**
     * 根据用户名查询员工
     * @param username
     * @return
     */
    Employee getByUsername(String username);

    /**
     * @Auth: lemon
     * @Desc: 根据名称查询员工信息
     * @Date:
     */
    List<Employee> pageEmployee(String name);

    /**
     * @Auth: lemon
     * @Desc: 新增员工
     * @Date:
     */
    void addEmployee(Employee employee);

    /**
     * @Auth: lemon
     * @Desc: 根据id查询员工信息
     * @Date:
     */
    Employee getEmployeeById(Long id);

    /**
     * @Auth: lemon
     * @Desc: 根据id启用、禁用员工账号
     * @Date:
     */
    void changeStatus(String status, String id);

    /**
     * @Auth: lemon
     * @Desc: 修改密码
     * @Date:
     */
    void editPassword(PasswordEditDTO passwordEditDTO);

    /**
     * @Auth: lemon
     * @Desc: 编辑员工信息
     * @Date:
     */
    void updateEmployee(Employee employee);
}
